
<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/pusher-list.css">
<script src="__PUBLIC__assets/better-scroll/bscroll.min.js"></script>
<style type="text/css">
.footer{
    display: none;
}
</style>
</block>
<block name="main">
<div class="content-header">
    <h5>理财投顾专区</h5>
    <div class="arrow-wrapper">
        <span class="arrow-right"></span>
    </div>
    <a href="/Home/Person/push_index">
        点击进入我的投顾中心
    </a>
</div>
<div class="content-body" id="listWrapper">
    <ul class="my-platform-wrapper">
    <foreach name="platform" item="v">
        <li class="my-platform-item">
            <div class="item-header">
                <div class="plat-logo-wrapper">
                    <img src="{$v.pic}?x-oss-process=image/resize,w_144" alt="">
                </div>
                <div class="plat-return-type-wrapper">
                    <p>{$v.team_type}</p>
                </div>
                <div class="spread-btn-wrapper">
                    <!--如果未认领，则显示下面的认领按钮-->
                    <if condition="$v.is_get eq 0">
                        <div class="get-plat-btn" onclick="apply_platfrom({$v.id})">认领平台</div>
                    <else/>
                        <a class="spread-btn" href="/Home/Recommend/m_marketing/recommend_id/{$_SESSION['user']['id']}/p_id/{$v.id}">分享推广</a>
                    </if>
                    <!--如果已认领，则显示下面的推广按钮-->
                    <!--<div class="spread-btn">分享推广</div>-->
                </div>
            </div>
            <div class="item-content">
                <ul class="item-content-wrapper">
                    <li>

                       

                        <if condition="$v[team_type] eq 'ROI'">
                             <p><em>×{$v.user_roi}</em>%</p>
                        <elseif condition="$v[team_type] eq 'CPA'"/>
                             <p><em>{$v.user_award}</em>元</p>
                        <elseif condition="$v[team_type] eq 'CPA+CPS'"/>
                            <p><em>{$v.user_award}</em>元</p>
                        </if>


                        <p class="item-desc">用户返利</p>
                    </li>
                    <li>

                        <if condition="$v[team_type] eq 'ROI'">
                             <p><em>×{$v.push_roi}</em>%</p>
                        <elseif condition="$v[team_type] eq 'CPA'"/>
                            <p><em>{$v.push_award}</em>元</p>
                        <elseif condition="$v[team_type] eq 'CPA+CPS'"/>
                           <p><em>{$v.push_award}</em>元</p>
                        </if>

                        
                        <p class="item-desc">投顾返利</p>
                    </li>
                    <li>
                        <p><em>{$v.yields}</em></p>
                        <p class="item-desc">往期年化</p>
                    </li>
                </ul>
                <ul class="item-content-wrapper">
                    <li>
                        <p><em>{$v.start_amount}</em>元</p>
                        <p class="item-desc">起投金额</p>
                    </li>
                    <li>
                        <p><em>{$v.deadline}</em></p>
                        <p class="item-desc">投资期限</p>
                    </li>
                    <li>
                        <if condition="$v[team_type] eq 'ROI'">
                            <p>多投多返</p>
                        <elseif condition="$v[team_type] eq 'CPA'"/>
                            <p>首投返利</p>
                        <elseif condition="$v[team_type] eq 'CPA+CPS'"/>
                            <p>首投+加息返利</p>
                        </if>

                        <p class="item-desc">返利类型</p>
                    </li>
                </ul>
            </div>
        </li>
    </foreach>
        
    </ul>
</div>
</block>
<block name="js">
<script>
    var wrapper1 = document.querySelector("#listWrapper")
    var scroll1 = new BScroll(wrapper1, {
        probeType: 1,
        click: true,
    })

      function apply_platfrom(platform_id) {
            $.post('{:U("Recommend/apply_platfrom")}', {
                platform_id: platform_id
            }, function (res) {
                layer.open({
                    content:res.msg
                    , skin: 'msg'
                    , time: 1
                    ,end:function(){
                        location.reload()
                    }
                });

            })
        }



</script>
</block>
